package top.zhimingw.tankgame2;

import javax.swing.*;

/**
 * @Author:zhimingw
 * @Version 1.0
 */
public class ZhimingwTankGame02 extends JFrame {

    //定义一个MyPanel
    MyPanel mp = null;
    public static void main(String[] args) {
        ZhimingwTankGame02 zhimingwTankGame01 = new ZhimingwTankGame02();

    }

    public ZhimingwTankGame02(){
        mp = new MyPanel();
        this.add(mp);
        this.add(mp);
        this.setSize(1000,750);
        this.addKeyListener(mp);//监听键盘事件
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }

}
